package com.ruicar.afs.cloud.basic.detail.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author: Lee
 * @date: 2020/5/11 19:39
 * @description:
 */
@Data
@ApiModel(value = "租金明细")
public class RentInfoVO {
    @ApiModelProperty("合同id")
    private Long contractId;
    @ApiModelProperty("合同号码")
    private String contractNo;
    @ApiModelProperty("期数总计")
    private Integer countTerm;
    @ApiModelProperty("已付期数")
    private Integer paidTerm;
    @ApiModelProperty("未付期数")
    private Integer unpaidTerm;
    @ApiModelProperty("月供金额 （未减去已收）")
    private BigDecimal monthPayAmt;
    @ApiModelProperty("逾期期数")
    private Integer overdueTerm;
    @ApiModelProperty("下期还款期数")
    private Integer nextRepaymentTerm;
    @ApiModelProperty("应收总计")
    private BigDecimal receivableTotal;
    @ApiModelProperty("利息总计 月利息（未减去已收）")
    private BigDecimal interestTotal;
    @ApiModelProperty("逾期本金总计  应收月本金-已收月本金")
    private BigDecimal sumOverdue;
    @ApiModelProperty("到期利息总计 应收月利息-已收月利息")
    private BigDecimal totalDue;
    @ApiModelProperty("逾期还款总额 -- 应收月租金-已收月租金")
    private BigDecimal totalPayment;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("上次付款时间")
    private Date succeedTime;
    @ApiModelProperty("上次付款金额")
    private BigDecimal arriveAmt;
    @ApiModelProperty("贴息总额")
    private BigDecimal totalDiscountAmt = new BigDecimal(0);
    //以下字段需要额外进行计算统计

    @ApiModelProperty("逾期利息（罚息）")
    private BigDecimal overdueInterest = new BigDecimal(0);
    @ApiModelProperty("客逾期应收总计（逾期应收款总计）")
    private BigDecimal overdueTotal = new BigDecimal(0);
    @ApiModelProperty("还逾期费用")
    private BigDecimal overdueMoney = new BigDecimal(0);

}
